import Mock from 'mockjs'
//图表数据
let List = []
export default {
  getStatiscaData: () => {
    for (let i = 0; i < 7; i++) {
      List.push(
        //Mock.Random.f1oat产生随机数100到8000之间保留小数最小0位最大0位
        Mock.mock({
          苹果: Mock.Random.float(100, 8000, 0, 0),
          华为: Mock.Random.float(100, 8000, 0, 0),
          vivo: Mock.Random.float(100, 8000, 0, 0),
          小米: Mock.Random.float(100, 8000, 0, 0),
          三星: Mock.Random.float(100, 8000, 0, 0),
          oppo: Mock.Random.float(100, 8000, 0, 0),
        })
      )
    }
    return {
      code: 2000,
      data: {
        //饼状图
        videoData: [
          {
            name: '苹果',
            value: 2999
          },
          {
            name: '华为',
            value: 5999
          },
          {
            name: 'vivo',
            value: 1999
          },
          {
            name: '小米',
            value: 2200
          },
          {
            name: '三星',
            value: 7999
          },
          {
            name: 'oppo',
            value: 5999
          },
        ],
        //柱状图
        userData: [
          {
            data: '周一',
            new: 5,
            active: 200
          },
          {
            data: '周二',
            new: 10,
            active: 30
          },
          {
            data: '周三',
            new: 15,
            active: 230
          },
          {
            data: '周四',
            new: 25,
            active: 240
          },
          {
            data: '周五',
            new: 35,
            active: 230
          },
          {
            data: '周六',
            new: 45,
            active: 220
          },
          {
            data: '周日',
            new: 35,
            active: 205
          },

        ],
        //折线图
        orderdata: {
          date: ['202201001', '202201002', '202201003', '202201004', '202201005', '202201006', '202201007',],
          data: List
        },
        tableitem: [
          {
            name: 'vivo',
            today: 100,
            mouthbuy: 100,
            totalbuy: 700
          },
          {
            name: '小米',
            today: 100,
            mouthbuy: 200,
            totalbuy: 600
          },
          {
            name: '苹果',
            today: 100,
            mouthbuy: 300,
            totalbuy: 400
          },
          {
            name: '华为',
            today: 100,
            mouthbuy: 400,
            totalbuy: 3300
          },
          {
            name: 'opper',
            today: 100,
            mouthbuy: 600,
            totalbuy: 200
          },
        ],
      }
    }
  }
}

